package com.shanzmoo.db.trade.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import lombok.*;

/**
 * <p>
 * 支付订单报文
 * </p>
 *
 * @author Gzhao
 * @since 2020-12-12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@EqualsAndHashCode(callSuper = false)
@TableName("pay_order_body")
public class PayOrderBodyEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 支付单号:(微信交易单号out_trade_no)
     */
    private String payNo;

    /**
     * 请求报文
     */
    private String reqBody;

    /**
     * 响应报文
     */
    private String respBody;

    /**
     * 支付查询响应报文
     */
    private String queryRespBody;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;


    public static PayOrderBodyEntity create(String payNo) {
        return PayOrderBodyEntity.builder().payNo(payNo).build();
    }
}
